package com.crm.jpaandthymeleaf.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author 周敬
 * @version 1.0
 * @packageName com.crm.jpaandthymeleaf.entity
 * @fileName CstActivity
 * @createTime 2021/12/15-20:19-星期三
 * @lastModify 2021/12/15-20:19-星期三
 */
@Entity
@Table(name = "cst_activity", schema = "crm", catalog = "")
public class CstActivity {
    private long atvId;
    private String atvCustNo;
    private String atvCustName;
    private Timestamp atvDate;
    private String atvPlace;
    private String atvTitle;
    private String atvDesc;

    @Id
    @Column(name = "atv_id")
    public long getAtvId() {
        return atvId;
    }

    public void setAtvId(long atvId) {
        this.atvId = atvId;
    }

    @Basic
    @Column(name = "atv_cust_no")
    public String getAtvCustNo() {
        return atvCustNo;
    }

    public void setAtvCustNo(String atvCustNo) {
        this.atvCustNo = atvCustNo;
    }

    @Basic
    @Column(name = "atv_cust_name")
    public String getAtvCustName() {
        return atvCustName;
    }

    public void setAtvCustName(String atvCustName) {
        this.atvCustName = atvCustName;
    }

    @Basic
    @Column(name = "atv_date")
    public Timestamp getAtvDate() {
        return atvDate;
    }

    public void setAtvDate(Timestamp atvDate) {
        this.atvDate = atvDate;
    }

    @Basic
    @Column(name = "atv_place")
    public String getAtvPlace() {
        return atvPlace;
    }

    public void setAtvPlace(String atvPlace) {
        this.atvPlace = atvPlace;
    }

    @Basic
    @Column(name = "atv_title")
    public String getAtvTitle() {
        return atvTitle;
    }

    public void setAtvTitle(String atvTitle) {
        this.atvTitle = atvTitle;
    }

    @Basic
    @Column(name = "atv_desc")
    public String getAtvDesc() {
        return atvDesc;
    }

    public void setAtvDesc(String atvDesc) {
        this.atvDesc = atvDesc;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CstActivity that = (CstActivity) o;
        return atvId == that.atvId && Objects.equals(atvCustNo, that.atvCustNo) && Objects.equals(atvCustName, that.atvCustName) && Objects.equals(atvDate, that.atvDate) && Objects.equals(atvPlace, that.atvPlace) && Objects.equals(atvTitle, that.atvTitle) && Objects.equals(atvDesc, that.atvDesc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(atvId, atvCustNo, atvCustName, atvDate, atvPlace, atvTitle, atvDesc);
    }
}
